﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace NASM_Develop_IDE
{
    static class ExceptionPrinter
    {
        public static void Print(Exception e)
        {
            
            using (FileStream stream = new FileStream("NasmDevelopIDE.log", FileMode.Append))
            {
                using (StreamWriter writer = new StreamWriter(stream))
                {
                    writer.Write("Error On" + DateTime.Now.ToString() + ":\n" + e.Message + "\nStack Trace:\n\n" + e.StackTrace);
                }
            }
        }
    }
}
